package com.xbdun.dao.bmp.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.xbdun.dao.bmp.entity.XbdunSysUserMobilesDto;

public interface SysUserMobilesMapper {

	//查询用户的电话是否已经存在
	@Select("SELECT COUNT(*) FROM xbdun_sys_user_mobiles WHERE userCode=${userCode} AND mobile=#{mobile}")
	public int existUserMobile(@Param("userCode")long userCode,@Param("mobile")String mobile);
	
	//插入用户ID
	@Insert("INSERT INTO xbdun_sys_user_mobiles(id,userCode,mobile) VALUES(#{id},#{userCode},#{mobile})")
	public int insertUserMobile(XbdunSysUserMobilesDto dto);
}
